<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width: 1000px;
            height: 1000px;
            display: flex;
            background: #f2f2f2;
            /*使用flex弹性布局*/
            display: flex;
            /*1.flex默认使用横向排版从左到右*/
            /*flex-direction:rwo;*/
            /*2.flex横向从右到左*/
            /* flex-direction: row-reverse; */
            /*3.在这个布局方向上可以使用特殊的布局方式*/
            /*a. 居中*/
            /* justify-content: center; */
            /*4. 居左 居右*/
            /* justify-content: flex-start; */
            /* justify-content: flex-end; */
            /*均分布局*/
            /* justify-content: space-around; */
            /*D.两端对齐*/
            justify-content: space-between;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="item">元素1</div>
        <div class="item">元素2</div>
        <div class="item">元素3</div>
        <div class="item">元素4</div>
    </div>
</body>
</html>